<?php


namespace app\api\model;


use think\Paginator;

trait SimplePaginate
{
    /**
     * @param Paginator $paginator
     * @return array
     */
    protected function simplePaginate(Paginator $paginator)
    {
        $p = $paginator->toArray();
        unset($p['per_page']);
        unset($p['last_page']);
        return $p;
    }
}
